package javaJob.exercise.primary.string;

public class primary14_answer {

        public boolean isAnagram(String s, String t) {
            int[]  a=new int[26];
            for(char a1:s.toCharArray()){
                a[a1 - 'a']++;
            }
            for(char b:t.toCharArray()){
                a[b - 'a']--;
            }
            for(int c:a){
                if(c!=0)
                    return false;
            }
            return true;
        }
}
